//
//  CellConfigSetting.h
//  JinganMindCloud
//
//  Created by JinganMac on 2020/6/29.
//  Copyright © 2020 JingAn. All rights reserved.
//

#import <Foundation/Foundation.h>

#define KRegular1Content  @"[(].*?[)]"    // 富文本 （ ）


typedef enum : NSUInteger {
    CContentType,   //内容
    CSubTitileType, //副标题
    CPhoneType,     //电话
    CEnclosureType, //附件
    CMainTitle,     //主标题
    CTextType,      //输入框
    CAttributeType, //富文本（小圆点+文字）
    CPhotoType      //照片
} CellSubType;

NS_ASSUME_NONNULL_BEGIN

@interface CellConfigSetting : NSObject

// 1: 显示下划线Cell
// 2: 显示框Cell
// 3: 文本显示Cell
@property (nonatomic, assign) NSInteger cellType;
/// 左边XXX的长度默认为70
@property (nonatomic, assign) CGFloat frontSpace;
/// 圆角度数
@property (nonatomic, assign) CGFloat cellCornerRadius;
/// 外框线框
@property (nonatomic, assign) CGFloat cellBorderWidth;
/// 外框线的颜色 16进制String
@property (nonatomic, strong) NSString *cellBorderColor;
///
@property (nonatomic, strong) NSArray *subConfigData;

///1.0.0
/// 距左右两边距离
@property (nonatomic, assign) CGFloat sideSpace;
/// 距上面边距离
@property (nonatomic, assign) CGFloat topSpace;
/// 距下边距离
@property (nonatomic, assign) CGFloat bottomSpace;
///1.1.0
@property (nonatomic, assign) UIEdgeInsets cellContentEdge;
//===========新版 messageCell=======需要用到字段
@property (nonatomic, strong) NSString *iconname;

@property (nonatomic, strong) NSString *iconurl;

@end



/// 子控件model 目前支持 XXXX:XXXX 或者 XXXXXXX    
@interface CellSubViewsConfigSetting : NSObject

@property (nonatomic, assign) CellSubType celltype;//

/// 标题
@property (nonatomic, strong) NSString *cTitleValue;
/// 内容部分根据key获取值
@property (nonatomic, strong) NSString *cKeyValue;
/// 初始默认值 不写默认显示 --
@property (nonatomic, strong) NSString *cDefalutValue;
/// 附件索引
@property (nonatomic, assign) NSInteger enclosureIndex;
///小圆点 颜色16进制    ● xxx
@property (nonatomic, strong) NSString *hexColor;
/// 主标题
/// 字体大小
@property (nonatomic, assign) CGFloat tFontSize;
/// 字体颜色
@property (nonatomic, assign) NSString *tFontColor;
/// 字体加粗
@property (nonatomic, assign) BOOL tFontBlod;
/// 副标题
/// 字体大小
@property (nonatomic, assign) CGFloat cFontSize;
/// 字体颜色
@property (nonatomic, assign) NSString *cFontColor;
/// 字体加粗
@property (nonatomic, assign) BOOL cFontBlod;
/// 是否支持点击 默认不支持（不需要点击事件时候不要设置该值为YES，会影响cell的点击）
@property (nonatomic, assign) BOOL couldTouch;
/// 富文本的正则描述 目前仅支持一种规则
@property (nonatomic, strong) NSString *regularDes;
/// 富文本颜色 十六进制数 535353
@property (nonatomic, strong) NSString *attributeColor;

/// 能否换行
@property (nonatomic, assign) BOOL canLinebreak;

/// 0 默认为0，标题居整体中，1：标题置顶
@property (nonatomic, assign) NSInteger normalType;

#pragma mark  构建一般组件
/// @param type 类型
/// @param title 标题
/// @param key 内容取值Key
+(CellSubViewsConfigSetting *)creatSubConfigBy:(NSInteger)type subTitle:(NSString *)title keyValue:(NSString *)key;

#pragma mark  构建小圆点+文字
/// @param hexColor 小圆点颜色
/// @param title 标题
/// @param key 内容取值Key

+(CellSubViewsConfigSetting *)creatAttributeSubBy:(NSString *)hexColor subTitle:(NSString *)title keyValue:(NSString *)key;
@end




NS_ASSUME_NONNULL_END
